home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / bnce_ra.exe / VIDEO.H < prev    next >
C/C++ Source or Header  |  1989-03-17  |  2KB  |  57 lines

  1. /* video.h - assorted video functions
  2.     Copyright (c) 1989 Ronald Abramson
  3. */
  4. #include <dos.h>
  5. #include <memory.h>
  6.  
  7. #define VIDEO_IO 0x10
  8. #define SET_CRSR_POS 2
  9. #define GET_CRSR_POS 3
  10. #define SET_VID_PAGE 5
  11. #define SET_VID_MODE 0
  12. #define GET_VID_MODE 0xf
  13.  
  14. union REGS regs;
  15.  
  16. typedef struct {
  17.     unsigned   VIDEO_SEG;    /* base video buffer segment */
  18.     unsigned   EQUIP_FLAG;   /* BIOS Equipment List Flag  */
  19.     char       page;         /* active video page         */
  20.     char       mode;         /* video mode                */
  21.     char       crsr_row;     /* cursor pos - row          */
  22.     char       crsr_col;     /* cursor pos - col          */
  23. } vid_rec;  /* struct for video config */
  24.  
  25. /* FUNCTION PROTOTYPES */
  26.  
  27. /* BIOS-level cursor functions */
  28. void crsr_pos_hide( char page ); /* duck the cursor to line 26 */
  29. void crsr_pos_restore( unsigned coords, char page );
  30. unsigned crsr_pos_get( char page ); /* ret: upper 8 bits = row, lower 8 = col */
  31. void crsr_pos_set( int y, int x, char page );
  32.  
  33. /* direct clear screen */
  34. void cl_scr( vid_rec *v );
  35.  
  36. /* set/get video mode */
  37. void set_vid_mode( char mode );
  38. char get_vid_mode( void );
  39.  
  40. /* save/restore the screen to and from a 4000 byte char buffer */
  41. void scr_save( vid_rec *v0, char *scr_buf );
  42. void scr_restore( vid_rec *v0, char *scr_buf );
  43.  
  44. /* save and restore video page */
  45. char get_vid_page( void );
  46. void restore_v0_page( char page );
  47.  
  48. /* window funcs - save, restore, clear, clear w/ attrib, hilite, border */
  49. void sav_wndw( int y0, int x0, int y1, int x1, char *temp_scr, vid_rec *v );
  50. void rst_wndw( int y0, int x0, int y1, int x1, char *temp_scr, vid_rec *v );
  51. void clr_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
  52. void clr_wndw_c( int y0, int x0, int y1, int x1, vid_rec *v, char attr );
  53. void lit_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
  54. void bor_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
  55. /* EOF video.h */
  56.  
  57.